package com.smartStatus.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.smartStatus.api.entity.SysRole;
import com.smartStatus.api.entity.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import javax.swing.text.StyledEditorKit;
import java.util.List;

/**
 * <p>
 * 系统用户表 Mapper 接口
 * </p>
 *
 * @author lby
 * @since 2021-01-11
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {
    /**
     * 用户角色关联
     */
    Boolean saveUserRole(@Param("userId") Integer userId, @Param("roleId") Integer roleId);

    /**
     * 导入数据校验
     */
    Integer countUsers(SysUser sysUser);


    /**
     * 获取用户
     *
     * @param roleId
     * @return
     */
    List<SysUser> getStudents(@Param("roleId") Integer roleId);


}
